import {
  Entity,
  PrimaryGeneratedColumn,
  CreateDateColumn,
  UpdateDateColumn,
  Column,
} from "typeorm";
// 商品规格
@Entity()
export class GoodsSkuSpec {
  @PrimaryGeneratedColumn()
  id: number;

  // @Column({ comment: "商品id" })
  // goods_id: number;

  @Column({
    length: 50,
    comment: "产品型号/规格名称",
  })
  spec_name: string;

  @Column({ comment: "价格" })
  price: number;

  @Column({ comment: "库存" })
  stock: number;

  @CreateDateColumn({
    type: "datetime",
    comment: "创建时间",
  })
  create_at: Date;

  @UpdateDateColumn({
    type: "datetime",
    comment: "更新时间",
  })
  update_at: Date;
}
